<template>
	<view style="background-color: #efefef;">
		<view style="background-color: #fff;">
			<view style="display: flex;justify-content: space-around;">
				<view style="width: 350rpx;">
					<u-input @click="time_btn" v-model="find.stime" border="true" type="select" placeholder='请选择开始日期' />
				</view>
				<view style="width: 350rpx;">
					<u-input @click="time_btn2" v-model="find.etime" border="true" type="select"
						placeholder='请选择结束日期' />
				</view>

			</view>
			<view style="display: flex;margin-top: 10rpx;margin-bottom: 10rpx;">
				<view style="width: 250rpx;">
					<u-input @click="reimStatus_btn" v-model="reimStatus_name" border="true" type="select"
						placeholder='报销状态' />
				</view>
				<view style="width: 250rpx;margin-bottom: 10rpx;">
					<u-input @click="operUserId_btn" v-model="operUserId_name" border="true" type="select"
						placeholder='收支情况' />
				</view>
				<view style="width: 250rpx;margin-bottom: 10rpx;">
					<u-input @click="moneyTypeIds_btn" v-model="moneyTypeIds_name" border="true" type="select"
						placeholder='金额类型' />
				</view>

			</view>
		</view>
		<view style="display: flex;width:100% ; height:4vh;align-items: center;justify-content: space-evenly;">

			<u-button size="mini" type="error" plain>收入：{{totalGath}}￥</u-button>
			<u-button size="mini" type="success" plain>支出：{{totalPay}}￥</u-button>
			<u-button size="mini" type="warning" plain>余额：{{getBalance}}￥</u-button>
			<u-button size="mini" type="primary" @click="add_bank">添加</u-button>

		</view>
		<scroll-view :scroll-top="scrollTop" @scroll="scroll" style="height: 90vh;width: 100%;" scroll-y
			@scrolltolower="tabReachBottom" :refresher-enabled="true" :refresher-threshold="80"
			:refresher-background="'#efefef'" :refresher-triggered="load.triggered" @refresherrefresh="downPullRefres">
			<view class="my-list">
				<view class="no-data" v-if="dataList.length == 0"><u-empty text="没有订单数据" mode="list"></u-empty></view>
				<template v-else>
					<view class="ml-item" v-for="(row, index) in dataList" :key="row.id">
						<view class="i-title-row">

							<view class="r-title">金额类型:{{row.moneyTypeName?row.moneyTypeName:''}}</view>
							<view style="font-size: 30rpx;color: red;" class="r-detail-btn">
								报销状态:{{row.isCheck == 'NO_CHECK'?'未操作':row.isCheck == 'CANCELLATION'?'已报销':row.isCheck == 'SETTLED'?'已结算':'无类型'}}

							</view>

						</view>
						<view class="i-title-row">

							<view>客户名称:{{ cusName_api(row.cusName)}}</view>


						</view>

						<view class="i-title-row">

							<view>银行名称:{{ row.myBankNum+'-'+row.myBankName}}</view>


						</view>
						<view class="i-title-row" style="display: flex;justify-content: space-between;">

							<view style="font-size: 30rpx;color: #00c3ce;">收入:{{ row.tradeInMoney}}</view>
							<view style="font-size: 30rpx;color: #ff9800;margin-left: 20rpx;">支出:{{ row.tradeOutMoney}}
							</view>
							<view style="font-size: 30rpx;color: red;margin-left: 20rpx;">金额:{{ row.balance}}</view>

						</view>
						<view class="i-title-row">

							<view style="font-size: 30rpx;color: #ff9800;" class="r-detail-btn">
								交易时间:{{row.tradeTime}}
							</view>

						</view>
						<view class="content">
							<view>备注:{{row.remark?row.remark:''}}</view>

						</view>

						<view class="bottom">

							<view :style="{'border-color': '#ffca28', 'color': '#ffca28'}" class="btn"
								@click="up_btn(row)">
								修改
							</view>
							<view :style="{'border-color': '#f00000', 'color': '#f00000'}" class="btn"
								@click="del_btn(row)">
								删除
							</view>
						</view>




					</view>


					<u-loadmore :status="load.status" :load-text="load.loadText" bgColor="#f2f2f2"></u-loadmore>
				</template>


			</view>
		</scroll-view>
		<u-picker :params="params" @confirm="time_confirm" @cancel="time_cancel" v-model="time_show"
			:default-time="time_value" mode="time"></u-picker>
		<u-picker :params="params" @confirm="time_confirm2" @cancel="time_cancel2" v-model="time_show2"
			:default-time="time_value" mode="time"></u-picker>
		<u-select @confirm="reimStatus_confirm" :label-name='"label"' :value-name='"id"' v-model="reimStatus_show"
			:list="reimStatusList"></u-select>
		<u-select @confirm="operUserId_confirm" :label-name='"label"' :value-name='"id"' v-model="operUserId_show"
			:list="operUserIdList"></u-select>
		<u-select @confirm="moneyTypeIds_confirm" :label-name='"typeName"' :value-name='"id"'
			v-model="moneyTypeIds_show" :list="moneyTypeIdsList"></u-select>

		<view>
			<u-popup v-model="picker_show1" mode="center" border-radius="14" :mask-close-able='false' closeable='true'>
				<view style="width: 90vw;height: 88vh;">
					<view style="text-align: center;font-size: 40rpx;font-weight: 700;padding-top: 40rpx;">{{title}}
					</view>
					<view style="padding: 20rpx 0rpx;">
						<u-row>
							<u-col span="12">
								<view style="display: flex;align-items: center;">
									<view>我的银行：</view>
									<u-input type='select' @click="add_data_select_btn1" v-model="add_data.myBankName"
										placeholder="请选择银行名称" :border="true" disabledColor="#ffffff"></u-input>
								</view>
							</u-col>
						</u-row>
						<u-row>
							<u-col span="12">
								<view style="display: flex;align-items: center;margin-top: 10rpx;">
									<view>银行卡号：</view>
									<u-input type='select' :disabled='true' v-model="add_data.myBankNum"
										placeholder="请选择银行名称" :border="true" disabledColor="#ffffff"></u-input>
								</view>
							</u-col>
						</u-row>
						<u-row>
							<u-col span="12">
								<view style="display: flex;align-items: center;margin-top: 10rpx;">
									<view>客户名称：</view>
									<u-input type='select' @click="add_data_select_btn2" v-model="cusName"
										placeholder="请选择客户名称" :border="true" disabledColor="#ffffff"></u-input>
								</view>
							</u-col>
						</u-row>
						<u-row>
							<u-col span="12">
								<view style="display: flex;align-items: center;margin-top: 10rpx;">
									<view>对方户名：</view>
									<u-input type='text' v-model="add_data.transName" placeholder="请选择对方户名"
										:border="true" disabledColor="#ffffff"></u-input>
								</view>
							</u-col>
						</u-row>
						<u-row>
							<u-col span="12">
								<view style="display: flex;align-items: center;margin-top: 10rpx;">
									<view>对方账号：</view>
									<u-input type='text' v-model="add_data.transNum" placeholder="请选择对方账号"
										:border="true" disabledColor="#ffffff"></u-input>
								</view>
							</u-col>
						</u-row>
						<u-row>
							<u-col span="12">
								<view style="display: flex;align-items: center;margin-top: 10rpx;">
									<view>收支状态：</view>
									<u-input type='select' @click="add_data_select_btn3" v-model="tradeStatus"
										placeholder="请选择收支状态" :border="true" disabledColor="#ffffff"></u-input>
								</view>
							</u-col>
						</u-row>
						<u-row v-if="zhichu">
							<u-col span="12">
								<view style="display: flex;align-items: center;margin-top: 10rpx;">
									<view>金额类型：</view>
									<u-input type='select' @click="add_data_select_btn4" v-model="moneyTypeId"
										placeholder="请选择金额类型" :border="true" disabledColor="#ffffff"></u-input>
								</view>
							</u-col>
						</u-row>
						<u-row>
							<u-col span="12">
								<view style="display: flex;align-items: center;margin-top: 10rpx;">
									<view>交易时间：</view>
									<u-input type='select' @click="add_data_select_btn5" v-model="add_data.tradeTime"
										placeholder="请选择交易时间" :border="true" disabledColor="#ffffff"></u-input>
								</view>
							</u-col>
						</u-row>
						<u-row>
							<u-col span="12">
								<view style="display: flex;align-items: center;margin-top: 10rpx;">
									<view>交易金额：</view>
									<u-input @input="tradeMoney_onChange" type='number' v-model="add_data.tradeMoney"
										placeholder="请选择交易金额" :border="true" disabledColor="#ffffff"></u-input>
								</view>
							</u-col>
						</u-row>
						<u-row>
							<u-col span="12">
								<view style="display: flex;align-items: center;margin-top: 10rpx;">
									<view>拥有余额：</view>
									<u-input type='number' :disabled='true' v-model="add_data.balance"
										placeholder="请选择银行名称" :border="true" disabledColor="#ffffff"></u-input>
								</view>
							</u-col>
						</u-row>
						<u-row>
							<u-col span="12">
								<view style="display: flex;align-items: center;margin-top: 10rpx;">
									<view>备注摘要：</view>
									<u-input style="width: 450rpx;" type='textarea' :clearable="true"
										:auto-height="true" v-model="add_data.remark" placeholder="请输入摘要" :border="true"
										disabledColor="#ffffff"></u-input>
								</view>
							</u-col>
						</u-row>

						<view style="padding: 60rpx 0rpx;width: 80vw;margin: auto;">
							<u-button type="primary" @click="ok_btn">确认提交</u-button>
						</view>


					</view>
				</view>
			</u-popup>
			<u-select :default-value='defaultValue' @confirm="add_data_confirm1" :label-name='"bankName"'
				:value-name='"bankName"' v-model="add_data_select1" :list="findBankCombo_list"></u-select>
			<u-select :default-value='defaultValue2' @confirm="add_data_confirm2" :label-name='"label"'
				:value-name='"id"' v-model="picker_show3" :list="operUserIdList2"></u-select>
			<u-select :default-value='defaultValue3' @confirm="add_data_confirm3" :label-name='"typeName"'
				:value-name='"id"' v-model="picker_show4" :list="moneyTypeIdsList2"></u-select>
			<u-picker :params="params" @confirm="add_data_confirm4" v-model="picker_show5" :default-time="time_value"
				mode="time"></u-picker>
			<u-modal :show-cancel-button='true' v-model="picker_show6" @confirm="add_data_confirm5"
				@cancel='add_data_cancel5' content="确认删除"></u-modal>
		</view>
		<view class="picker_css" v-if="picker_show2">
			<view style="display: flex;justify-content: space-around;margin-top: 10rpx;">
				<view style="width: 70vw;">
					<u-input @input="onChange" v-model="curval1" border='true' :placeholder="'请输入客户名称'" :maxlength="30"
						:margin="'16rpx'" @change="onChange"></u-input>
				</view>
				<view style="width: 20vw;">
					<u-button @click="onChange" type="primary">搜索</u-button>
				</view>

			</view>

			<view v-if='getStationListPages_list.length >0' class="list-content">
				<view class="point-item" v-for="(it, index) in getStationListPages_list" :key="index" :data-obj="it"
					@click="picker_confirm1(it)">
					<view class="point-name">
						<u-icon name="map" :color="'#00c3ce'" size="20"></u-icon>
						{{it.cusRealName+'-'+it.cusPhone}}
					</view>
				</view>
			</view>
			<view v-else class="list-content">
				<view style="font-weight: 700;margin-top: 200rpx;font-size: 60rpx;text-align: center;">
					暂无数据,请点击地图选址</view>
			</view>
		</view>

	</view>
</template>

<script>
	export default {

		data() {
			return {
				defaultValue: [0],
				defaultValue2: [0],
				defaultValue3: [0],
				picker_show6: false,
				findBankCombo_list: [],
				add_data_select1: false,
				title: '添加银行流水',
				picker_show1: false,
				picker_show2: false,
				picker_show3: false,
				picker_show4: false,
				picker_show5: false,
				getStationListPages_list: [],
				curval1: '',
				zhichu: true,
				balance_data: 0,
				cusName: '',
				tradeStatus: '',
				moneyTypeId: '',
				add_data: {
					balance: '0',
					cusName: "",
					moneyTypeId: "",
					myBankName: "",
					myBankNum: "",
					remark: "",
					tradeMoney: "",
					tradeStatus: "",
					tradeTime: "",
					transName: "",
					transNum: "",
					id: "",
				},
				totalGath: 0,
				totalPay: 0,
				getBalance: 0,
				add_data_confirm5_data: {},
				params: {
					year: true,
					month: true,
					day: true,
					hour: true,
					minute: true,
					second: true,
				},
				time_show: false,
				time_show2: false,
				moneyTypeIds_name: '',
				moneyTypeIdsList: [],
				moneyTypeIdsList2: [],
				moneyTypeIds_show: false,
				operUserId_name: '',
				operUserIdList: [{
					id: '全部',
					label: '全部',

				}, {
					id: '0',
					label: '收入',

				}, {
					id: '1',
					label: '支出',

				}, ],
				operUserIdList2: [{
					id: '0',
					label: '收入',

				}, {
					id: '1',
					label: '支出',

				}, ],
				operUserId_show: false,
				reimStatus_name: '',
				reimStatusList: [{
					id: '全部',
					label: '全部',

				}, {
					id: 'NO_CHECK',
					label: '未操作',

				}, {
					id: 'CANCELLATION',
					label: '已报销',

				}, {
					id: 'SETTLED',
					label: '已结算',

				}, ],
				reimStatus_show: false,
				find: {
					page: {
						pageNum: 1,
						pageSize: 20,
					},
					stime: '',
					etime: '',
					timeType: '0',
					isCheck: '',
					moneyTypeIds: [],
					tradeStatus: '',

				},
				dataList: [],
				load: this.U.scopy(this.C.loadmore),
				scrollTop: 0,
				old: {
					scrollTop: 0
				},

			}
		},
		onReady() {
			let currentDate = new Date();

			let year = currentDate.getFullYear();
			let month = String(currentDate.getMonth() + 1).padStart(2, '0'); // 月份从0开始，需要加1，然后补0
			let day = String(currentDate.getDate()).padStart(2, '0');
			let hours = String(currentDate.getHours()).padStart(2, '0');
			let minutes = String(currentDate.getMinutes()).padStart(2, '0');
			let seconds = String(currentDate.getSeconds()).padStart(2, '0');

			let formattedDate = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;


		},
		onLoad(e) {
			this.queryList()
		},
		// 在 App.vue 中设置页面切换监听
		onShow() {

		},
		mounted() {
			let that = this
			that.$u.api.findMtypeCombo({}).then(res => {
				let list = res.data

				that.moneyTypeIdsList = list

				let data = {
					typeName: '全部',
					id: '全部'
				}
				that.moneyTypeIdsList.unshift(data)
			})
			that.$u.api.findMtypeCombo({}).then(res => {
				let list = res.data
				that.moneyTypeIdsList2 = list

			})

			that.$u.api.findBankCombo({}).then(res => {
				that.findBankCombo_list = res.data || [];


			})

			that.$u.api.findComboCusList({
				find: '',
				page: {
					pageNum: 1,
					pageSize: 999,
				},
			}).then(res => {
				that.getStationListPages_list = res.data || [];


			})



		},
		methods: {
			up_btn(e) {
				this.add_data.balance = e.balance
				this.add_data.cusName = e.cusName
				this.cusName = e.cusName ? e.cusName.split(',')[0] : ''
				this.add_data.moneyTypeId = e.moneyTypeId
				this.add_data.myBankName = e.myBankName
				this.add_data.myBankNum = e.myBankNum
				this.add_data.remark = e.remark

				if (e.tradeInMoney > 0) {
					this.add_data.tradeMoney = e.tradeInMoney
					this.add_data.tradeStatus = 0
					this.tradeStatus = '收入'
					this.zhichu = true
				} else if (e.tradeOutMoney > 0) {
					this.add_data.tradeMoney = e.tradeOutMoney
					this.add_data.tradeStatus = 1
					this.tradeStatus = '支出'
					this.zhichu = false

				}
				this.add_data.tradeTime = e.tradeTime
				this.add_data.transNum = e.transNum
				this.add_data.transName = e.transName
				this.add_data.id = e.id
				this.curval1 = ''
				this.moneyTypeId = e.moneyTypeName








				this.title = '修改银行流水'
				this.picker_show1 = true



			},
			del_btn(e) {
				this.add_data_confirm5_data = e
				this.picker_show6 = true

			},
			add_data_cancel5() {
				this.picker_show6 = false
			},
			add_data_confirm5() {

				let that = this
				that.$u.api.delBtl({
					ids: [that.add_data_confirm5_data.id],
					myBankNum: that.add_data_confirm5_data.myBankNum
				}).then(res => {
					if (res.code == 1) {
						that.queryList()
						that.picker_show6 = false
						return uni.showToast({
							title: res.msg,
							icon: "none",
							duration: 1000
						})
					} else {
						that.picker_show6 = false
						return uni.showToast({
							title: res.msg,
							icon: "none",
							duration: 1000
						})
					}
				})
			},
			ok_btn() {
				console.log(this.add_data, 'this.add_data')
				let that = this
				if (!that.add_data.myBankName) {

					return uni.showToast({
						title: '请输入银行名称',
						icon: "none",
						duration: 2000
					})
				} else if (!that.add_data.myBankNum) {

					return uni.showToast({
						title: '请输入银行卡号',
						icon: "none",
						duration: 2000
					})
				} else if (!that.add_data.tradeMoney) {

					return uni.showToast({
						title: '请输入交易金额',
						icon: "none",
						duration: 2000
					})
				}
				if (that.title == '添加银行流水') {

					that.$u.api.addBtl(that.add_data).then(res => {
						if (res.code == 1) {
							that.queryList()
							that.picker_show1 = false

							return uni.showToast({
								title: res.msg,
								icon: "none",
								duration: 1000
							})
						} else {
							return uni.showToast({
								title: res.msg,
								icon: "none",
								duration: 1000
							})
						}
					})
				} else {

					that.$u.api.modifyBtl(that.add_data).then(res => {
						if (res.code == 1) {
							that.queryList()
							that.picker_show1 = false

							return uni.showToast({
								title: res.msg,
								icon: "none",
								duration: 1000
							})
						} else {
							return uni.showToast({
								title: res.msg,
								icon: "none",
								duration: 1000
							})
						}
					})
				}
			},
			tradeMoney_onChange() {
				if (!this.add_data.myBankName) {
					this.add_data.tradeMoney = ''

					return uni.showToast({
						title: '请先选择我的银行',
						icon: "none",
						duration: 2000
					})
				}
				if (this.add_data.tradeStatus == 0 || this.add_data.tradeStatus == 1) {

				} else {
					this.add_data.tradeMoney = ''

					return uni.showToast({
						title: '请先选择收支状态',
						icon: "none",
						duration: 2000
					})
				}

				if (this.add_data.tradeStatus == '0') {
					let num = Number(this.balance_data) + Number(this.add_data.tradeMoney)
					this.add_data.balance = Math.round(num * 100) / 100
				} else {
					let num = Number(this.balance_data) - Number(this.add_data.tradeMoney)
					this.add_data.balance = Math.round(num * 100) / 100
				}
			},
			add_data_confirm4(e) {
				this.add_data.tradeTime = e.year + "-" + e.month + "-" + e.day + " " + e.hour + ":" + e.minute + ":" + e
					.second;
				this.time_value = e.year + "-" + e.month + "-" + e.day + " " + e.hour + ":" + e.minute + ":" + e.second;
			},
			add_data_select_btn3() {
				this.picker_show3 = true
			},
			add_data_confirm3(e) {
				this.add_data.moneyTypeId = e[0].value
				this.moneyTypeId = e[0].label
				
				let index = 0;				for (let i = 0; i < this.moneyTypeIdsList2.length; i++) {					if (this.moneyTypeIdsList2[i].id == e[0].value) {						index = i;						break					}				}				this.defaultValue3[0] = index;
				
				
			},
			add_data_confirm2(e) {
				this.add_data.tradeMoney = ''
				this.moneyTypeId = ''
				this.add_data.moneyTypeId = ''
				if (e[0].value == '0') {
					this.add_data.tradeStatus = '0'
					this.tradeStatus = '收入'
					this.zhichu = true
				} else if (e[0].value == '1') {
					this.add_data.tradeStatus = '1'
					this.tradeStatus = '支出'
					this.zhichu = false
				}
				
				let index = 0;				for (let i = 0; i < this.operUserIdList2.length; i++) {					if (this.operUserIdList2[i].id == e[0].value) {						index = i;						break					}				}				this.defaultValue2[0] = index;
			},
			onChange() {
				let that = this
				that.$u.api.findComboCusList({
					find: that.curval1,
					page: {
						pageNum: 1,
						pageSize: 999,
					},
				}).then(res => {
					that.getStationListPages_list = res.data || [];


				})
			},
			add_data_select_btn1() {
				this.add_data_select1 = true
			},
			add_data_select_btn2() {
				this.picker_show2 = true
			},
			add_data_select_btn4() {
				this.picker_show4 = true
			},
			add_data_select_btn5() {
				this.picker_show5 = true
			},
			picker_confirm1(e) {
				this.add_data.cusName = e.cusRealName + ',' + e.cusPhone
				this.cusName = e.cusRealName
				this.picker_show2 = false
			},
			defaultValuecancel(e) {
				console.log(1, e)
				this.defaultValue = [0]
			},
			add_data_confirm1(e) {

				let that = this
				that.add_data.myBankName = e[0].value
				let data = []
				for (let i = 0; i < that.findBankCombo_list.length; i++) {
					if (e[0].value == that.findBankCombo_list[i].bankName) {
						data.push(that.findBankCombo_list[i])
					}
				}

				if (data.length > 2) {

					return uni.showToast({
						title: '银行名有重复请联系管理员',
						icon: "none",
						duration: 2000
					})
				} else {
					that.add_data.myBankNum = data[0].cardNo
				}
				that.$u.api.findBalanceByBankInfo({
					myBankName: data[0].bankName,
					myBankNum: data[0].cardNo,
				}).then(res => {
					that.add_data.balance = res.data
					that.balance_data = res.data


				})

				let index = 0;
				for (let i = 0; i < that.findBankCombo_list.length; i++) {
					if (that.findBankCombo_list[i].bankName == e[0].value) {
						index = i;
						break
					}
				}
				that.defaultValue[0] = index;


			},
			add_bank(e) {
				let that = this
				that.add_data.balance = 0
				that.add_data.cusName = ''
				that.add_data.moneyTypeId = ''
				that.add_data.myBankName = ''
				that.add_data.myBankNum = ''
				that.add_data.remark = ''
				that.add_data.tradeMoney = ''
				that.add_data.tradeStatus = ''
				that.add_data.tradeTime = ''
				that.add_data.transName = ''
				that.add_data.transNum = ''
				that.add_data.id = ''
				that.cusName = ''
				that.tradeStatus = ''
				that.moneyTypeId = ''
				that.curval1 = ''
				that.zhichu = true

				that.title = '添加银行流水'
				that.picker_show1 = true
			},
			cusName_api(e) {
				let data = ''
				if (e) {
					let arr = e.split('/@')
					if (arr) {
						let arr_data = []
						for (let i = 0; i < arr.length; i++) {
							arr_data.push(arr[i].split(',')[0])
						}
						data = arr_data.join(',')


					} else {
						data = e.split(',')[0]

					}
				}

				return data
			},

			moneyTypeIds_btn() {
				this.moneyTypeIds_show = true
			},
			moneyTypeIds_confirm(e) {
				// if (e[0].value == '全部') {
				// 	this.find.moneyTypeIds = []
				// 	this.moneyTypeIds_name = ''
				// } else {
				// 	this.find.moneyTypeIds = [e[0].value]
				// 	this.moneyTypeIds_name = e[0].label
				// }




				this.queryList()
				this.moneyTypeIds_show = false

			},
			operUserId_btn() {
				this.operUserId_show = true
			},
			operUserId_confirm(e) {


				if (e[0].value == '0') {
					this.find.tradeStatus = '0'
					this.operUserId_name = '收入'
				} else if (e[0].value == '1') {
					this.find.tradeStatus = '1'
					this.operUserId_name = '支出'
				} else if (e[0].value == '全部') {
					this.find.tradeStatus = ''
					this.operUserId_name = ''
				}




				this.queryList()
				this.operUserId_show = false

			},
			reimStatus_btn() {
				this.reimStatus_show = true
			},
			time_btn() {
				this.time_show = true
			},
			reimStatus_confirm(e) {

				if (e[0].value == 'NO_CHECK') {
					this.find.isCheck = 'NO_CHECK'
					this.reimStatus_name = '未操作'
				} else if (e[0].value == 'CANCELLATION') {
					this.find.isCheck = 'CANCELLATION'
					this.reimStatus_name = '已报销'
				} else if (e[0].value == 'SETTLED') {
					this.find.isCheck = 'SETTLED'
					this.reimStatus_name = '已结算'
				} else if (e[0].value == '全部') {
					this.find.isCheck = ''
					this.reimStatus_name = ''
				}
				this.queryList()
				this.reimStatus_show = false

			},
			time_confirm(e) {

				this.find.stime = e.year + "-" + e.month + "-" + e.day + " " + e.hour + ":" + e.minute + ":" + e.second;
				this.time_value = e.year + "-" + e.month + "-" + e.day + " " + e.hour + ":" + e.minute + ":" + e.second;
				this.time_show = false
				this.queryList()
			},
			time_cancel() {
				this.time_show = false
			},
			time_btn2() {
				this.time_show2 = true
			},
			time_confirm2(e) {

				this.find.etime = e.year + "-" + e.month + "-" + e.day + " " + e.hour + ":" + e.minute + ":" + e.second;
				this.time_value = e.year + "-" + e.month + "-" + e.day + " " + e.hour + ":" + e.minute + ":" + e.second;
				this.time_show2 = false
				this.queryList()
			},
			time_cancel2() {
				this.time_show2 = false
			},
			// 查询数据
			queryList(page) {
				let that = this

				// 存在，则表示刷新
				if (!page) {
					// 开始刷新
					that.load.triggered = true;
					console.log(that.find.page.pageNum)
					that.find.page.pageNum = 1;
					console.log(that.find.page.pageNum)
				}
				let params = that.find
				that.$u.api.findBankTradeList(params).then(res => {
					// 第一页的时候，停止刷新
					if (!page) {
						// 停止刷新
						that.load.triggered = false;
						// 刷新则清空列表
						that.dataList = [];
					}
					if (res.code == 1) {
						if (res.data.list.total > res.data.list.list.length) {
							let dataList = res.data.list.list
							that.totalGath = res.data.totalGath
							that.totalPay = res.data.totalPay
							that.getBalance = res.data.balance

							that.count = res.data.list.total
							// 追加数据
							if (that.dataList.length < that.count) {
								that.dataList = that.dataList.concat(dataList);
							} else {

							}


							that.load.status = that.dataList.length == that.count ? 'nomore' : 'loadmore';
						} else {
							let dataList = res.data.list.list

							// 追加数据
							that.dataList = dataList
							that.count = res.data.list.total
							// 设置加载状态
							that.load.status = that.dataList.length == that.count ? 'nomore' : 'loadmore';
						}

					}
				});
			},

			scroll: function(e) {

				this.old.scrollTop = e.detail.scrollTop
			},
			goTop: function(e) {
				let that = this
				// 解决view层不同步的问题

				that.scrollTop = that.old.scrollTop

				that.$nextTick(function() {
					that.scrollTop = 0

				});


			}, // 设置-底部上滑加载数据时状态显示
			tabReachBottom() {
				let that = this;

				// 数据已经加载完
				if (that.dataList.length == that.dataList.total) {
					// 设置加载状态为：没有更多了
					that.load.status = 'nomore';
				} else {
					// 设置加载状态为：加载中...
					that.load.status = 'loading';
					// 增加一页页码
					that.find.page.pageNum++;
					that.queryList(1);
				}
			},
			// 下拉刷新
			downPullRefres() {
				// 重新查询

				this.queryList();
			},

		},



	}
</script>
<style lang="scss">
	.recognition_view {
		z-index: 9999;
		position: fixed;
		top: 650rpx;
		left: calc(100vw - 90vw);
		width: 80vw;
		height: 30vh;
		background-color: #a6a6a6;
		border-radius: 8rpx;

	}

	.recognition_css {
		z-index: 8888;
		font-weight: 700;
		font-size: 30rpx;
		display: flex;
		justify-content: center;
		align-items: center;
		flex-wrap: wrap;
		flex-direction: column;
		top: 920rpx;
		right: 10rpx;
		border-radius: 50%;
		width: 120rpx;
		height: 120rpx;
		background-color: #00C3CE;
		position: fixed;
		color: #ffffff
	}

	.content_box {
		width: 90%;
		margin: auto;
		height: 70vh;
		background-color: #fff;
		border-radius: 10rpx;
		padding: 10rpx 20rpx;
		overflow: auto;
	}

	.u-form-item {
		padding: 10rpx 0 !important;
	}

	.picker_css {

		width: 100vw;
		height: 100vh;
		z-index: 29999;
		position: fixed;
		top: 0;
		left: 0;
		background-color: #fff;
	}

	.list-content {
		height: calc(100vh - 150rpx);
		overflow: auto;
		margin-top: 10rpx;

		.point-item {
			border-bottom: 2rpx solid #efefef;
			line-height: 44rpx;
			padding: 10rpx 60rpx 10rpx 20rpx;
			position: relative;

			.point-name {
				display: flex;
				font-weight: 600;
				font-size: 30rpx;
				color: #333;
			}

			.point-address {
				color: #999;
				font-size: 26rpx;
			}

			.point-collect {
				top: calc((100% - 40rpx)/2);
				right: 20rpx;
				position: absolute;
			}
		}
	}

	.bottom {
		display: flex;
		margin-top: 20rpx;
		justify-content: flex-end;
		align-items: center;

		.btn {
			line-height: 52rpx;
			padding: 0rpx 16rpx;
			border-radius: 26rpx;
			border: 2rpx solid #ff9900;
			font-size: 26rpx;
			text-align: center;
			color: #ff9900;
			;
			margin-right: 10rpx;
		}

		.more {
			align-self: center;
			flex: 1;
			margin-right: 10rpx;
		}

		.evaluate {
			color: $u-type-warning-dark;
			border-color: $u-type-warning-dark;
		}
	}
</style>
<style lang="less">
	.lt-btns {
		display: flex !important;
	}

	.qj-list {
		min-height: 100vh;
		padding-top: 2rpx;
	}

	.routeSimpleName {
		position: absolute;
		left: 380rpx;
		width: 200rpx;
		background: #fff;
		top: 10rpx;
		z-index: 9999;
		text-align: center;
		border-radius: 10rpx;
		border: 1px solid #00C3CE;
		color: #00C3CE;
		margin-right: 10rpx;
		display: flex;
		height: 40rpx;
		justify-content: space-between;

	}
</style>